package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.Channel;
import com.caigou.bean.cms.entity.ChannelData;
import com.caigou.bean.cms.param.ArticlePublishChannelParam;
import com.caigou.bean.cms.param.ChannelDataListParam;
import com.caigou.bean.cms.template.ChannelDataTemplate;
import com.caigou.bean.vo.ChannelHotSearchVo;
import com.caigou.pojo.ArticleReleaseChannelList;
import com.caigou.pojo.ArticleReleaseList;
import com.caigou.pojo.ChannelDataList;
import com.caigou.pojo.ChannelDataMobile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository("ChannelDataMapper")
public interface ChannelDataMapper {
    List<ChannelDataList> loadChannelRecommendDataList(@Param("plateId") String plateId);

    ChannelData loadChannelIsHaveData(@Param("plateId") String plateId, @Param("articleId") String articleId);

    int saveChannelData(ChannelData channelData);

    ChannelData loadLastChannelData(@Param("articleId") String articleId);

    ChannelData loadArticleReleaseChannelData(@Param("articleId") String articleId, @Param("plateId") String plateId);

    int loadChannelDataRecommendStatus(@Param("id") Integer id);

    int deleteChannelData(@Param("id") Integer id);

    List<ChannelData> loadChannelDataListByArticle(@Param("articleId") String articleId);

    List<ChannelDataList> loadChannelDataList(ChannelDataListParam param);

    int loadChannelDataMaxStick(@Param("plateId") String plateId);

    int updateChannelDataStickStatus(@Param("id") Integer id, @Param("maxStick") Integer maxStick);

    int loadChannelDataCount(@Param("plateId") String plateId);

    int loadChannelDataLockCount(@Param("plateId") String plateId);

    int updateChannelDataRecommendStatus(@Param("id") Integer id, @Param("recommendStatus") Integer recommendStatus);

    Channel loadRecommendOldData(@Param("plateId") String plateId);

    int updateChannelDataLockStatus(@Param("id") Integer id, @Param("lockStatus") Integer lockStatus);

    int updateChannelDataShowIndex(@Param("id")Integer id, @Param("showIndex")Integer showIndex);

    Integer loadArticleReleaseStatus(@Param("articleId") String articleId, @Param("plateId") String plateId);

    List<ChannelDataMobile> loadChannelBannerDataMobileList(@Param("plateId") String plateId);

    List<ChannelDataMobile> loadChannelDataMobileList(@Param("plateId") String plateId);

    List<ChannelDataMobile> loadChannelAllDataMobileList(@Param("plateId") String plateId);

    int loadArticleReleaseCount(@Param("articleId") String articleId);

    List<ArticleReleaseList> loadArticleReleaseList(@Param("articleId") String articleId);

    int deleteChannelDataByArticle(@Param("articleId") String articleId);

    List<ChannelData> loadLastChannelAllData(String articleId);

    List<ChannelHotSearchVo> loadChannelHotSearchData(@Param("strPlateId") String strPlateId, @Param("dateSql") Integer dateSql);

    List<ChannelHotSearchVo> loadChannelHotSearchDataALL(@Param("dateSql") Integer dateSql);

    List<ChannelDataList> findChannelDataListByPlateIds(@Param("plateIds") List<String> plateIds);

    List<ChannelDataMobile> loadChannelDataMoreMobileList(@Param("list") List<String> list);

    List<String> loadRssList();

    int deleteArticle(@Param("articleId") String articleId);

    List<ChannelDataTemplate> loadChannelDataByChannel(@Param("plateId") String plateId, @Param("channelCount") Integer channelCount);

    List<ChannelDataTemplate> loadChannelDataByChannelStr(@Param("plateId") String plateId, @Param("channelCount") Integer channelCount);

    int updateChannelDataRecommendStatusByArticleAndChannel(@Param("articleId") String articleId, @Param("plateId") String plateId, @Param("recommendStatus") Integer recommendStatus);

    List<ArticleReleaseChannelList> loadArticleReleaseChannelList(@Param("articleId") String articleId);
}
